package com.zyz.A_程序基础.B_运算.布尔;

/**
 * @author: vick
 * @Date: 2025/3/10
 * @Description:
 * @version: 1.0
 */
public class Demo2 {
    public static void main(String[] args) {

        int a = -100;
        /*
        * 如果 a >0 返回 "大于0"
        * 否则返回 "小于0"
        * */
        String result;
        if (a > 0) {
            result = "大于0";
        }else {
            result = "小于0";
        }
        System.out.println(result);


        String result2 = a > 0 ? "大于0" : "小于0";
        System.out.println(result2);
    }
}
